\begin{tikzpicture}
[
	input/.style={circle, draw=black!50, fill=blue!20, minimum size = 6mm},
	hidden/.style={rectangle, draw=black!50, fill=yellow!30, rounded corners,minimum width = 0.7cm, minimum height=6mm},
	output/.style={rectangle, draw=black!50, fill=red!20, rounded corners,minimum width = 0.7cm, minimum height=6mm}
]
\matrix (network)
[matrix of nodes,
column sep={1.5cm},
row sep={0cm}]
{
	& \node[hidden] (hidden-1) {}; & \\
	\node[input] (input-1) {}; & & \\
	&\node[hidden] (hidden-2) {}; & \node[output,yshift=0.2cm] (output-1) {}; \\
	\node[input] (input-2) {}; & & \\
 	& \node[hidden] (hidden-3) {}; & \node[output,yshift=-0.2cm] (output-2) {};\\
	\node[input] (input-3) {}; & & \\
	& \node[hidden](hidden-4){}; &\\
};
% Layer Lables
%\node[above, yshift = 5mm] at (hidden-1.north) {Hidden Layer};
%\node[above, yshift = 11.1mm] at (input-1.north) {Input};
%\node[above, yshift = 17mm, xshift=3mm] at (output-1.north) {Output Layer};

% ... marks
\node[above, rotate=90, xshift=3.5mm, yshift=-1.5mm] at (input-3.north) {....}; 
\node[above, rotate=90, xshift=3.5mm, yshift=-2mm] at (hidden-4.north) {....}; 
\node[above, rotate=90, xshift=4mm, yshift=-1.5mm] at (output-2.north) {....}; 

% Input to Hidden Connect
\foreach \x in {1,...,3} {
	\ifthenelse{\x=3}{\node[above left] at (input-\x.west) {$x_n$};}{\node[above left] at (input-\x.west) {$x_\x$};}
	\draw[-stealth] ([xshift=-8mm]input-\x.west) -- (input-\x);
	\foreach \y in {1,...,4} {
		\draw (input-\x) --  (hidden-\y);
	}
}
% Labels for hidden layer
\node[above right] at (hidden-1.north) {$z_1$};
\node[above right] at (hidden-2.north) {$z_2$};
\node[above right] at (hidden-3.north) {$z_3$};
\node[below right] at (hidden-4.east) {$z_m$};

%Labels for output layer
\node[above right,yshift=2mm] at (output-1.east) {$y_1$};
\node[above right,yshift=2mm] at (output-2.east) {$y_p$};

% Hidden to output connect
\foreach \x in {1,...,2} {	
	\draw[-stealth] (output-\x) -- ([xshift=5mm]output-\x.east);
	\foreach \y in {1,...,4} {
		\draw (hidden-\y) -- (output-\x);
	}
}
\end{tikzpicture}
